<%inherit file="/base.mako"/>

<%def name="head()">
<script src="/media/js/table_action.js" type="text/javascript"></script>
</%def>

<%def name="content()">
% if c.errors:
<table>
	<thead>
		<tr>
			<th></th>
			<th>Time</th>
			<th>App Name</th>
			<th>Message Name</th>
			<th>Error Message</th>
			<th colspan="2">Actions</th>
		</tr>
	</thead>
	<tbody>
	% for error in c.errors:
		<tr>
			<td><a href="/error_report/view/${error.id}">View</a></td>
			<td>${error.time.strftime('%Y-%m-%d %I:%M %p')}</td>
			<td>${error.app_name}</td>
			<td>${error.message_name}</td>
			<td>${error.error_message}</td>

			<td>
				<a class="table_action" href="/error_report/retry/${error.id}">Retry</a>
			</td>

			<td>
				<a class="table_action" href="/error_report/delete/${error.id}">Delete</a>
			</td>
		</tr>
	% endfor
	</tbody>
</table>
% else:
	<p>There are currently no errors. Puzzah!</p>
% endif
</%def>
